package com.ztorn.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;

@Service
public class WebService {

    @Autowired
    private RestTemplate restTemplate;

    private final String SERVER_NAME = "ztorn-order";

    public String getOrderStr(){
        String result = restTemplate.getForObject("http://"+SERVER_NAME+"/testapi",String.class);
        return result;
    }
}
